package com.kang.c0c.tree.node;


/**
 * 抽象语法树的子节点，定义了抽象语法树中的函数返回操作
 * return		:RETRUN	返回
 * 
 * @field
 * expr			：需要返回的表达式子节点
 * @author kang
 *
 * Feb 6, 2009
 */
public class ReturnNode extends Node implements Nodes{
	private BinaryNode expr;
	private int pos;
	
	public ReturnNode(){
		this(null,0);
	}
	
	public ReturnNode(BinaryNode expr, int pos){
		super(RETURN);
		this.expr = expr;
		this.pos = pos;
	}
	
	public BinaryNode getExpr() {
		return expr;
	}

	public void setExpr(BinaryNode expr) {
		this.expr = expr;
	}

	public int getPos() {
		return pos;
	}

	public void setPos(int pos) {
		this.pos = pos;
	}
}
